/**
 * Created by qiushaohua on 14-5-22.
 */
define(["app"], function (app) {

    var deps = ["$window"];

    function service($window) {
        var isActivated = true;

        $window.onfocus = function() {
            isActivated = true;
        };
        $window.onblur = function() {
            isActivated = false;
        };

        return {
            isActivated: function () {
                return isActivated;
            }
        };
    }

    service.$inject = deps;
    app.lazy.service("WindowActivatedService", service);
});
